package com.lagou.edu.service.impl;

import com.lagou.edu.dao.BillDetailMapper;
import com.lagou.edu.pojo.BillDetail;
import com.lagou.edu.service.BillDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Service
@Transactional
public class BillDetailServiceImpl implements BillDetailService {

    @Autowired
    private BillDetailMapper billDetailMapper;


    @Override
    public void addBillDetail(BillDetail bill) {
        billDetailMapper.addBillDetail(bill);
    }

    @Override
    public List<BillDetail> queryBillDetail(String billNum) {
        return billDetailMapper.queryBillDetail(billNum);
    }

    @Override
    public void deleteBillDetail(String billNum,String detailNum) {
        billDetailMapper.deleteBillDetail(billNum,detailNum);
    }

    @Override
    public void updateBillDeail(Map<String, String> map) {
        billDetailMapper.updateBillDetail(map);
    }
}
